﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using ProjetoComperio.DataLayer.Entities;
using ProjetoComperio.BusinessLogicLayer;

namespace ProjetoComperio.Presentation.Web.Controllers
{
    public class ReportController : Controller
    {
        private ContributionBLL contributionBLL;
        private PersonBLL personBLL;

        public ReportController()
        {
            contributionBLL = new ContributionBLL();
            personBLL = new PersonBLL();
        }

        //
        // GET: /Report/

        public ActionResult Index()
        {
            return View();
        }

        [HttpGet]
        public ActionResult ContributionsMostCommented()
        {
            ViewData["GridSource"] = contributionBLL.RetrieveContributionsMostCommented();
            return View();
        }

        [HttpGet]
        public ActionResult UsersPerEducationLevel()
        {
            ViewData["GridSource"] = personBLL.RetrieveEducationLevels();
            return View();
        }

    }
}
